.method-type {
  color: #1485CC;
  margin-left: 0.25em;
  margin-right: 0.25em;
}

.api-nav {
  position: fixed;
  left: 1160px;
  top: 0px;
  width: 300px;
  height: 100%;
  padding-bottom: 10px;
  overflow-y: auto;
  background-color: var(--menu-bg, #fafafa);
  border-left: 1px solid var(--border-color, #ddd);
  scrollbar-width: thin;
  scrollbar-color: var(--border-color, #ddd) var(--menu-bg, #fafafa);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.api-nav::-webkit-scrollbar {
  width: 8px;
}

.api-nav::-webkit-scrollbar-track {
  background: var(--menu-bg, #fafafa);
}

.api-nav::-webkit-scrollbar-thumb {
  background-color: var(--border-color, #ddd);
  border-radius: 4px;
}

.api-nav::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-muted, #777);
}

.api-nav .nav-item-title {
  font-size: 0.9em;
}

.api-nav-content {
  margin-top: 10px;
  margin-bottom: 35px;
}

.api-nav a {
  color: var(--text-muted, #777);
  transition: color 0.2s ease;
}

.api-nav a:hover {
  color: var(--link-color, #0971B2);
}

.api-nav a:focus-visible {
  outline: 3px solid var(--focus-ring, #0971B2);
  outline-offset: 2px;
  border-radius: 2px;
}

.api-nav .nav-item-sub {
  display: block;
  font-size: 0.66em;
}

.nav-item-sub > li {
  padding: 2px 0px;
}

.api-nav ul {
  margin-top: 0.25em;
  padding-left: 1em;
}

.api-nav ul li {
  margin-bottom: 0.1em;
  list-style-type: none;
}

.item-header-wrap {
  position: relative;
}

.api-content {
  margin-top: 3em;
}

/* Responsive API navigation */
@media (max-width: 1785px) {
  .api-nav {
    display: none;
  }
}

/* Tablet: Show API nav as collapsible sidebar */
@media (min-width: 1400px) and (max-width: 1785px) {
  .api-nav {
    display: block;
    left: auto;
    right: 0;
    width: 280px;
    z-index: 10;
  }
}

/* Mobile: API nav as bottom sheet or hidden */
@media (max-width: 1400px) {
  .api-nav {
    display: none;
  }
  
  /* Optionally show as bottom sheet on mobile */
  .api-nav.mobile-open {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    height: 50vh;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-color, #ddd);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 8px var(--shadow, rgba(0, 0, 0, 0.1));
  }
}

ul {
  margin-top: -10px;
}

li {
  margin-bottom: 0.5em;
}

hr.separate-api-elements {
  border: 0;
  height: 1px;
  background: -webkit-gradient(linear, left top, right top, from(rgba(221, 221, 221, 0.0)), color-stop(0.5, rgba(221, 221, 221, 0.33)), to(rgba(221, 221, 221, 0.0)));
  margin-left: auto;
  margin-right: auto;
  margin-top: 45px;
  margin-bottom: 35px;
}

hr.separate-api {
  margin-top: 55px;
  margin-bottom: 45px;
  border: 0;
  height: 3px;
  background: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.0)), color-stop(0.5, rgba(0, 0, 0, 0.33)), to(rgba(0, 0, 0, 0.0)));
}

/* CPC ad */

#api-carbon-ad {
  width: 250px;
  margin-top: 75px;
}

.native-ad img {
  width: auto !important;
}

.native-ad {
  visibility: hidden;
  position: relative;
  transition: all .25s ease-in-out;
  line-height: 1.5;
  border-radius: 3px;
  opacity: 0;
  background-color: #fff;
  overflow: hidden;
}

.native-show {
  opacity: 1;
  visibility: visible;
}

.native-ad a {
  color: #111;
  display: block;
  text-decoration: none;
}

.native-ad span {
  display: block;
}

.native-banner { position: relative; }
.native-cta {
  position: absolute;
  bottom: 0;
  border-bottom: solid 1px #eee;
  width: 100%;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  padding: 6px 0;
  text-align: center;
  letter-spacing: .5px;
}

.native-img {
  display: block;
  padding: 44px 60px 68px;
  height: 50px;
}

.native-desc {
  font-size: 14px;
  padding: 8px 10px;
  margin-bottom: 30px;
}

.native-desc strong {
  font-weight: 600;
}

.native-sponsor {
  font-size: 9px;
  position: absolute;
  bottom: 0;
  width: 100%;
   background: repeating-linear-gradient(-45deg, transparent, transparent 5px, hsla(0, 0%, 0%, .025) 5px, hsla(0, 0%, 0%, .025) 10px) hsla(203, 11%, 90%, 0.3);
  padding: 8px 10px;
  text-transform: uppercase;
  letter-spacing: .2px;
}

.deprecated {
  color: #ff0000;
  font-weight: 600;
}

/* Accessibility improvements */
.method-type:focus-visible,
.api-nav .nav-item-title:focus-visible {
  outline: 3px solid var(--focus-ring, #0971B2);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Dark mode support for API page */
@media (prefers-color-scheme: dark) {
  .api-nav {
    background-color: var(--menu-bg, #252525);
    border-left-color: var(--border-color, #444);
  }
  
  .api-nav a {
    color: var(--text-muted, #888);
  }
  
  .api-nav a:hover {
    color: var(--link-color, #4a9eff);
  }
  
  .native-ad {
    background-color: var(--bg-secondary, #2d2d2d);
  }
  
  .native-ad a {
    color: var(--text-primary, #e0e0e0);
  }
}
